<template>
  <div>
    <!-- <div class="box">类名样式</div> -->
    <!-- 注意：行内样式不能转换 -->
    <!-- <div style="width: 20px">行内样式</div> -->
    <div class="top">
      <slot />
    </div>
    <div class="cont">
      <div class="left">
        <slot name="left">
          <!-- 默认显示的内容 -->
          left
        </slot>
      </div>
      <div class="right">
        <slot name="right" :row="row"> right </slot>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data () {
    return {
      row: {
        name: '小红',
        age: 8
      }
    }
  }
}
</script>

<style lang="less" scoped>
.cont {
  display: flex;
  justify-content: space-between;
}
.box {
  width: 100px;
  height: 100px;
  border: 2px solid #ddd;
  background: red;
}
</style>
